import React, {useState} from "react";
import {Row} from "antd";
import Box from "../Box";

interface IPlayground {
    array: number[][]
}

const Playground: React.FC<IPlayground> = (props, context) => {
    const [array, setArray] = useState(props.array)
    return <div className={"snake-draw"}>
        <Row>
            {
                array.map((column, index) =>
                    column.map((box, index) =>
                        <Box value={box} key={index}/>)
                )
            }
        </Row>
    </div>
}

export default Playground;